home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Report Writers / Crystal Repot 9.0 Full CD version / Setup.exe / Windows / System32 / HTMLRE90.DLL / HTML / 11250 < prev    next >
Encoding:
Text File  |  2002-07-05  |  8.6 KB  |  284 lines

  1. <HTML>
  2. <HEAD>
  3.  
  4. <LINK REL="stylesheet" TYPE="text/css" HREF="%4css/default.css">
  5.  
  6. <script language="Javascript">
  7. //LOCALIZATION STRINGS
  8. var _errNoSelected = "No license key selected";
  9. var _errNoNewKey = "No new license key entered";
  10. var _strUnlimited = "unlimited";
  11. var _strDeleteKey = "Are you sure you want to delete the license key: %s?";
  12. </script>
  13.  
  14. <SCRIPT language="JavaScript">
  15. // Global variables
  16. var currentKeys = new Array();
  17. var cumulKeys;
  18. var startSelect = -1;
  19.  
  20. // Structure to store key name and properties
  21. function KeyInfo (n, des, cl, unlock_cl, con, unlock_con, processors, unlock_p, reports, expires)
  22. {
  23.   var UNLOCKED = _strUnlimited;
  24.   this.name         = n;
  25.   this.descr        = des;
  26.  
  27.   this.clients = unlock_cl ? UNLOCKED : cl ;
  28.   this.concurrent = unlock_con ? UNLOCKED : con;
  29.   this.processors = unlock_p ? UNLOCKED : processors;
  30.   this.reports = reports;
  31.   this.expires    = expires;
  32.  
  33.   if(n != "cumul")
  34.   {
  35.     if(this.clients == 0)
  36.         this.clients = "-";
  37.     if(this.concurrent == 0)
  38.         this.concurrent = "-";
  39.     if(this.processors == 0)
  40.         this.processors = "-";
  41.     if(this.reports == 0)
  42.         this.reports = "-";
  43.     if(this.expires == "")
  44.         this.expires = "-";
  45.   }
  46. }
  47.  
  48. // Assign license key values
  49. function getKeys()
  50. {
  51.   // Assign key values
  52. %1
  53. }
  54.  
  55. // Populate page
  56. function init()
  57. {
  58.   startSelect = -1;
  59.   getKeys();
  60.     
  61.   // Populate list box
  62.   document.currentKeysForm.keyListBox.options[0] = null;   // remove "filler"
  63.   for (var i = 0; i < currentKeys.length; i++)
  64.     document.currentKeysForm.keyListBox.options[i] =  new Option(currentKeys[i].name + currentKeys[i].descr, currentKeys[i].name);
  65.                
  66.   // Display properties of selected key
  67.   if (currentKeys.length > 0)
  68.     startSelect = currentKeys.length - 1;  
  69.  
  70.   if (startSelect >= 0)
  71.   {
  72.     document.currentKeysForm.keyListBox.selectedIndex = startSelect;
  73.     displayKeyProperties();
  74.   }
  75.   else 
  76.   {
  77.       document.propertiesForm.keyClientsDisp.value     = 0;
  78.     document.propertiesForm.keyConcurrentDisp.value  = 0;
  79.     document.propertiesForm.keyProcessorsDisp.value  = 0;
  80.     if(document.propertiesForm.keyReportsDisp)
  81.         document.propertiesForm.keyReportsDisp.value = 0;
  82.     document.propertiesForm.keyExpiresDisp.value     = "";
  83.   }
  84.        
  85.   // Populate cummulative values
  86.   if (cumulKeys != null)
  87.   {
  88.     document.propertiesForm.cumulClientsDisp.value     = cumulKeys.clients;
  89.     document.propertiesForm.cumulConcurrentDisp.value  = cumulKeys.concurrent;
  90.     document.propertiesForm.cumulProcessorsDisp.value  = cumulKeys.processors;
  91.     if(document.propertiesForm.cumulReportsDisp)
  92.         document.propertiesForm.cumulReportsDisp.value = cumulKeys.reports;
  93.   }
  94.     
  95.   document.currentKeysForm.keyListBox.focus = true;  
  96.  
  97.   if (document.layers)
  98.     //netscape
  99.       document.newKeyForm.keyTextBox.size = 40;
  100.   else
  101.     document.newKeyForm.keyTextBox.size = 46;
  102. }
  103.  
  104. // Display current key properties (fired by keyListBox onChange)
  105. function displayKeyProperties()
  106. {
  107.   var i = document.currentKeysForm.keyListBox.selectedIndex;
  108.   if (i >= 0)
  109.   {
  110.     document.propertiesForm.keyClientsDisp.value     = currentKeys[i].clients;
  111.     document.propertiesForm.keyConcurrentDisp.value  = currentKeys[i].concurrent;
  112.     document.propertiesForm.keyProcessorsDisp.value  = currentKeys[i].processors;
  113.     if(document.propertiesForm.keyReportsDisp)
  114.         document.propertiesForm.keyReportsDisp.value = currentKeys[i].reports;
  115.     document.propertiesForm.keyExpiresDisp.value     = currentKeys[i].expires;
  116.   }
  117.   else
  118.   {
  119.     document.propertiesForm.keyClientsDisp.value     = "";
  120.     document.propertiesForm.keyConcurrentDisp.value  = "";
  121.     document.propertiesForm.keyProcessorsDisp.value  = "";
  122.     if(document.propertiesForm.keyReportsDisp)
  123.         document.propertiesForm.keyReportsDisp.value = "";
  124.     document.propertiesForm.keyExpiresDisp.value     = "";
  125.     
  126.   }
  127. }
  128.  
  129. // Handle Remove Key button being pressed
  130. function onRemoveKey()
  131. {
  132.   if (document.currentKeysForm.keyListBox.selectedIndex < 0)
  133.   {
  134.     alert (_errNoSelected);
  135.     return;
  136.   }    
  137.   document.currentKeysForm.index.value = 
  138.     document.currentKeysForm.keyListBox.selectedIndex;
  139.  
  140.   // Print out a confirm dialog
  141.   if (!confirm(_strDeleteKey.replace(/%s/i, 
  142.        document.currentKeysForm.keyListBox.options[document.currentKeysForm.keyListBox.selectedIndex].text)))
  143.     return; 
  144.       
  145.   document.currentKeysForm.submit(); 
  146. }
  147.  
  148. // Handle Add Key button being pressed
  149. function onAddKey()
  150. {
  151.   if (document.newKeyForm.keyTextBox.value == "")
  152.   {
  153.     alert (_errNoNewKey);
  154.     return;
  155.   }
  156.   document.newKeyForm.submit(); 
  157. }
  158.  
  159. // Handle resize when running Netscape
  160. function onResizeNetscape()
  161. {
  162.   if (navigator.appName == "Netscape")
  163.   {
  164.     init();
  165.   }
  166. }
  167.  
  168. window.onresize = onResizeNetscape;
  169.  
  170.  
  171. </SCRIPT>
  172. </HEAD>
  173.  
  174.  
  175. <BODY onload = "init();">
  176.  
  177. <DIV ID="tooltip" STYLE="position:absolute;visibility:hidden;z-index:99;"></DIV>
  178. <SCRIPT SRC="%5js/helps.js"></SCRIPT>
  179. <SCRIPT SRC="%6js/tips.js"></SCRIPT>
  180.  
  181. <b>%7</b>
  182.  
  183. <p>
  184.  
  185. Currently held license keys (Select a key to see its licensing information)
  186.  
  187. <BR>
  188. <BR>
  189.  
  190. <table border=1 CELLSPACING=0><tr><td> 
  191. <TABLE border=0 cellspacing=5 cellpadding=0> 
  192.   <!----------- Entry form for new key ----------->
  193.   <FORM name=newKeyForm  action="%3" method="post">
  194.     <TR>
  195.       <TD class="list" colspan=1 nowrap>Add Key</TD>
  196.     
  197.       <TD class="list" colspan=1 align=right><INPUT name=keyTextBox></td>
  198.  
  199.       <TD colspan=1>
  200.           <table border=0 cellpadding=0 align=center> 
  201.             <tr>
  202.                 <td class="clsButton" align=middle nowrap>
  203.                 <div class="clsButton"><a href="javascript:onAddKey();" onMouseOver="StRight(104);window.status='';return true;" onMouseOut="Ht()"> Add </a></div> 
  204.                 </td>
  205.             </tr>
  206.           </table>
  207.       </TD>
  208.     </TR>            
  209.   </FORM>
  210.  
  211.   <!----------- Form for Current Keys ----------->
  212.   <FORM name=currentKeysForm  action="%2" method="post">
  213.     <INPUT type=hidden name=index value=0>
  214.     <tr>
  215.       <TD class="list" colspan=2 width=420>
  216.         <SELECT class="menuFormElement" name=keyListBox size=5 style="HEIGHT: 118px; WIDTH: 420px"  onChange="displayKeyProperties();">
  217.         <!-- Option is filler to get right width -->
  218.         <OPTION>0M-0000M0M-MMM0M0M-00M0000 (Pxxxxxx + Mxxxxxxxxxx xxxx)</OPTION>
  219.         </SELECT>
  220.       </TD>
  221.       <TD valign=top>
  222.           <table border=0 cellpadding=0 align=center> 
  223.         <tr>
  224.             <td class="clsButton" align=middle nowrap>
  225.             <div class="clsButton"><a href="javascript:onRemoveKey();" onMouseOver="StRight(105);window.status='';return true;" onMouseOut="Ht()"> Delete </a></div> 
  226.             </td>
  227.         </tr>
  228.         </table>
  229.       </TD>
  230.     <TR>
  231.   </FORM>
  232.  
  233.   <tr><td class="list" colspan=3 nowrap>(Changes take effect immediately - on click of Add or Delete)</td></tr>
  234. </table>
  235. </td></tr></table>
  236.  
  237. <BR>
  238.  
  239. <strong> Licensing Information </strong>
  240.  
  241. <BR>
  242. <BR>
  243.  
  244. <table cellspacing=5>
  245.   <!----------- Display only form for Properties ----------->
  246.   <FORM name=propertiesForm>
  247.     <TR align=right>
  248.       <TD class="list">  </TD>
  249.       <TD class="list" align=center>Selected Key</TD>  
  250.       <TD class="list">          </TD>
  251.       <TD class="list" align=center>Total Licenses</TD>
  252.       <TD class="list"> </TD></TR>
  253.     <TR align=right>
  254.       <TD class="list">Named Users: </TD>
  255.       <TD class="list"><INPUT name=keyClientsDisp       size=12 readonly class=displayOnly></TD>
  256.       <TD class="list">          </TD>
  257.       <TD class="list"><INPUT name=cumulClientsDisp     size=12 readonly class=displayOnly></TD>
  258.       <TD class="list"> </TD></TR>
  259.     <TR align=right>
  260.       <TD class="list">Concurrent Users: </TD>
  261.       <TD class="list"><INPUT name=keyConcurrentDisp    size=12 readonly class=displayOnly></TD>
  262.       <TD class="list">          </TD>
  263.       <TD class="list"><INPUT name=cumulConcurrentDisp  size=12 readonly class=displayOnly></TD>
  264.       <TD class="list"> </TD></TR>
  265.     <TR align=right>
  266.       <TD class="list">Processors: </TD>
  267.       <TD class="list"><INPUT name=keyProcessorsDisp     size=12 readonly class=displayOnly></TD>
  268.       <TD class="list">           </TD>
  269.       <TD class="list"><INPUT name=cumulProcessorsDisp   size=12 readonly class=displayOnly></TD>
  270.       <TD class="list"> </TD>
  271.       </TR>
  272.  
  273.       %8
  274.  
  275.     <TR align=right>
  276.       <TD class="list">Expires: </TD>
  277.       <TD class="list"><INPUT name=keyExpiresDisp     size=12 readonly class=displayOnly></TD>
  278.       </TR>
  279.   </FORM>    
  280. </TABLE>
  281.  
  282. </BODY>
  283. </HTML>
  284.